<template>
  <div class="pro-vue-notice">
    <notice :pageSize="10" ref="notice" :isHideBtn="true" />
  </div>
</template>
<script>
import notice from './modules/message/notice'

let noticeVM
// 刷新角标
window._workmsg_refreshBadge = function (badges) {
  Ext.each(badges, (badge) => {
    // 刷新功能
    if (badge.refresh) {
      let item
      switch (badge.type) {
        case 'MSG': // 消息通知
          item = noticeVM
          break;
        default:
        break;
      }
      if (item) {
        item.refresh()
      }
    }
  })
}
export default {
  name: 'Notice',
  components: {
    notice,
  },
  mounted() {
    noticeVM = this.$refs.notice
    noticeVM.setVisible(true)
    // setTimeout(() => {//去掉待办减掉高度设定，对组件进行修改
    //   // $('.pro-vue-workflow .listview-body').css({
    //   //   height: `${$('.pro-vue-workflow').parent().height() - 161}px`,
    //   // });
    // }, 100);
  },
}
</script>
<style lang="scss">
.pro-vue-notice {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  .el-tabs.el-tabs--top .el-tabs__item {
    padding: 0 20px;
    color: grey;
  }
  .el-tabs.el-tabs--top .el-tabs__active-bar {
    display: none;
  }
  .message-itemview .itemview-header .close {
    display: none;
  }
  .message-itemview .itemview-body .je-vue-listview .listview-body {
    min-height: 570px;
  }
}
</style>
